/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jsalon.web.controller;
import jamjun.infra.web.Content;
import jamjun.infra.web.Controller;
import jamjun.infra.web.Json;
import jamjun.infra.web.Result;
import jamjun.infra.web.View;
import javax.servlet.annotation.WebServlet;
import jsalon.enumtype.Gender;
import jsalon.model.Customer;
import jsalon.web.vm.TestsVM;
/**
 *
 * @author Java
 */
@WebServlet(name = "tests", urlPatterns = {"/tests"})
public class TestsController extends Controller {
    public static Result content()
    {
        return new Content("Test Hello Jamjun");
    }
    
    public static Result getJson()
    {
        jsalon.model.Customer customer = new Customer();
        customer.code = "cust001";
        customer.name = "jamjun";
        customer.gender = Gender.woman;
        return new Json(customer);
    }
    
    public static Result index()
    {
        TestsVM viewModel = new TestsVM();
        viewModel.Massage="Hello";
        return new View("/View/Tests/index.jsp",viewModel);
    }
    
    
    
}
